
import type { ROOTSTATE } from "../store"
import { useSelector } from "react-redux"

type Props = {
    children: React.ReactNode
}
export const RouterAuth = ({ children }: Props) => {
    const { isLogin } = useSelector((state: ROOTSTATE) => state.userStore)
    return isLogin ?  children  : <div>请登录</div>
}




